import {request} from "./request"

export function getDetailData(iid){
  return request({
    url: '/detail',
    params: {
      iid: iid
    }
  })
}

export function getRecommend(){
  return request({
    url: '/recommend'
  })
}

export class Goods{
  constructor(itemInfo, columns, services){
    this.title = itemInfo.title
    this.desc = itemInfo.desc
    this.newPrice = itemInfo.price
    this.oldPrice = itemInfo.oldPrice
    this.price = itemInfo.lowNowPrice
    this.discount = itemInfo.discountDesc
    this.disColor = itemInfo.discountBgColor
    this.columns = columns
    this.services = services
  }
}

export class Shop{
  constructor(shopInfo) {
    this.logo = shopInfo.shopLogo
    this.name = shopInfo.name
    this.sells = shopInfo.cSells
    this.goods = shopInfo.cGoods
    this.score = shopInfo.score
  }
}

